Question: Find all the solutions to
\[\sqrt{(2 + \sqrt{3})^x} + \sqrt{(2 - \sqrt{3})^x} = 4.\]Enter all the solutions, separated by commas.
Solution: Let $y = \sqrt{(2 + \sqrt{3})^x}.$  Then
\[\sqrt{(2 - \sqrt{3})^x} = \sqrt{ \left( \frac{1}{2 + \sqrt{3}} \right)^x } = \frac{1}{\sqrt{(2 + \sqrt{3})^x}} = \frac{1}{y},\]so the given equation becomes $y + \frac{1}{y} = 4.$  Then $y^2 + 1 = 4y,$ or
\[y^2 - 4y + 1 = 0.\]By the quadratic formula,
\[y = 2 \pm \sqrt{3}.\]Thus,
\[\sqrt{(2 + \sqrt{3})^x} = 2 \pm \sqrt{3}.\]For the $+$ root,
\[\sqrt{(2 + \sqrt{3})^x} = 2 + \sqrt{3},\]so $x = 2.$  For the $-$ root,
\[\sqrt{(2 + \sqrt{3})^x} = 2 - \sqrt{3} = \frac{1}{2 + \sqrt{3}} = (2 + \sqrt{3})^{-1},\]so $x = -2.$   Thus, the solutions are $\boxed{2,-2}.$